package com.example.service;

import com.example.entity.authority.PartyCheck;
import com.example.entity.authority.SystemUser;
import com.example.entity.authority.UserCheck;
import com.example.entity.authority.UserMetastasis;
import com.example.ext.entity.ExtSysUser;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * Created by youkun on 2017/8/13.
 */
public interface SysUserService {

    Map<String,Object> findUserList(Long userId);

    Map<String,Object> findUserByUserName(SystemUser systemUser);

    Map<String,Object> findSysUserList(ExtSysUser sysUser);

    Map<String,Object> upload(MultipartFile file, HttpServletRequest request);

    Map<String,Object> uploadRootData(MultipartFile file, HttpServletRequest request);

    void getImage(String dateString, String fileName, HttpServletResponse response);

    void getElevatorImage(String partyId, String fileName, HttpServletResponse response);

    Map<String,Object> deleteImage(String dateString, String fileName);

    Map<String,Object> addUser(ExtSysUser extSysUser);

    Map<String,Object> findById(String di);

    Map<String,Object> update(ExtSysUser systemUser);

    Map<String,Object> delete(List<String> ids,String partyType,String partyId);

    Map<String,Object> getVersion();


    /**
     * 查询用户拥有的功能
     * @param id
     * @return
     */
    Map<String,Object> findUserFunction(String id);

    /**
     * 查询角色拥有的权限
     * @param roleId
     * @return
     */
    Map<String,Object> findUserFunctionByRoleId(String roleId);

    /**
     * 根据partyId查询用户列表
     * @param partyId
     * @return
     */
    Map<String,Object> queryByPartyId(String partyId);

    /**
     * 生产二维码
     * @return
     */
    Map<String,Object> createQrcode(String elevatorId,String elevatorType,String elevatorNum, String partyId);

    /**
     * 查询用户所拥有的功能
     * @param id
     * @return
     */
    Map<String,Object> findFuncSID(String id);

    /**
     * 个人用户注册
     * @return
     */
    Map<String,Object> registerUser(UserCheck userCheck);

    /**
     * 个人用户审核
     * @param userCheck
     * @return
     */
    Map<String,Object> checkRegisterUser(UserCheck userCheck);

    /**
     *企业注册
     * @param partyCheck
     * @return
     */
    Map<String,Object> registerParty(PartyCheck partyCheck);

    /**
     * 企业用户审核
     * @param partyCheck
     * @return
     */
    Map<String,Object> checkRegisterParty(PartyCheck partyCheck);

    /**
     * 查询个人用户
     * @param userCheck
     * @return
     */
    Map<String,Object> queryUserCheckList(UserCheck userCheck);

    /**
     * 查询企业
     * @param partyCheck
     * @return
     */
    Map<String,Object> queryPartyCheckList(PartyCheck partyCheck);

    /**
     * 找回密码
     * @param email
     * @return
     */
    Map<String,Object> resetPassword(String email);

    /**
     * 导入用户人员
     * @param file
     * @param partyId
     * @return
     */
    Map<String,Object> importPartyPerson(MultipartFile file,String partyId,String partyType);


    /**
     * 人脸对比
     * @param user
     * @param file
     * @return
     */
    Map<String,Object> checkFace(SystemUser user,MultipartFile file);

    /**
     * 更新用户状态
     * @param user
     * @return
     */
    Map<String,Object> updateUserState(Map user);

    /**
     * 更新用户所属机构
     * @param partyUser
     * @return
     */
    Map<String,Object> updateUserParty(Map partyUser);

    /**
     * 更新用户手机号
     * @param user
     * @return
     */
    Map<String,Object> updateUserPhone(Map user);

    /**
     * 更新用户密码
     * @param user
     * @return
     */
    Map<String,Object> updateUserPwd(Map user);

    //更新faceUrl
    Map<String,Object> updateFaceUrl(SystemUser systemUser);

    /**
     * 根据接收单位查所有审批转移用户
     * @param userMetastasis
     * @return
     */
    Map<String,Object> findTomy(UserMetastasis userMetastasis);

    /**
     * 新增转移用户
     * @param userMetastasis
     * @return
     */
    Map<String,Object> addMeatasis(UserMetastasis userMetastasis);

    /**
     * 更新转移用户
     * @param userMetastasis
     * @return
     */
    Map<String,Object> updateMeatasis(Map param);

    /**
     *
     * @param id
     * @return
     */
    Map<String, Object> getMarkById(Long id);
}

